package com.primeton.esper.config;

import com.espertech.esper.client.Configuration;
import com.espertech.esper.core.thread.ThreadingOption;

/**
 * 配置信息及上下文信息的工厂类
 * 
 * @author Fick Song
 * 
 */
public class ConfigurationFactory {

	private static Configuration esperConfig;

	public static Configuration getEsperConfiguration() {
		if (esperConfig == null) {
			esperConfig = new Configuration();
			esperConfig.addEventTypeAutoName("com.primeton.esper.evententry");
			ThreadingOption.isThreadingEnabled = false;
			// esperConfig.getEngineDefaults().getThreading().setInternalTimerEnabled(false);
		}
		return esperConfig;
	}

}
